<%= semantic_form_for(@agreement) do |form| %>
<% if @agreement.errors.any? %>
<div id="error_explanation">
	<h2><%= pluralize(@agreement.errors.count, "error") %> prohibited this agreement from being saved:</h2>
	<ul>
		<% @agreement.errors.full_messages.each do |msg| %>
		<li>
			<%= msg %>
		</li>
		<% end %>
	</ul>
</div>
<% end %>
<div class="form-left">
	<%= form.inputs "Agreement detail" , :class=>"detail-form" do %>
	<%= form.input :agreement_no ,:hint => "Auto generate by system.", :input_html => { :disabled => true }%>
	<%= form.input :customer , :collection=>@customer_list , :required => true , :input_html => { :disabled => @read_only }%>
	<%= form.input :user , :include_blank => false , :default => @current_user , :hint => "Default by current login user ("+@current_user.login+")", :required => true , :input_html => { :disabled => @read_only }%>
	<% end %>
</div>
<%unless @read_only %>
<%= form.commit_button %>
<% end %>
<% end %> 